<template>
  <!-- 顶部导航栏 -->
  <AppNavBar />
  <!-- 头部组件 -->
  <AppHeader />
  <!-- 吸顶部分 -->
  <AppHeadSticky />

  <div class="main-part">
    <router-view></router-view>
  </div>
  <!-- 底部组件 -->
  <AppFooter />
  <!-- 二级路由 -->
</template>

<script>
import AppNavBar from '@/components/app-nav-bar.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import AppHeadSticky from '@/components/app-head-sticky.vue'
import { useStore } from 'vuex'
export default {
  name: 'LayoutPage',
  components: {
    AppNavBar,
    AppHeader,
    AppFooter,
    AppHeadSticky
  },
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style lang="less" scoped>
 .main-part {
  min-height: 600px;
 }
</style>
